<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BServiceApp
 *
 * @author ID59C
 */
class BServiceAppConfig extends BConfig {

    protected $paths = array();  

    public function init() {
        parent::init();
        $this->initPaths();
        $this->initImport();
    }

    public function initImport() {
        $paths = $this->paths;

        yii::import($paths['basePath'] . '.*');
        yii::import($paths['classPath'] . '.*');
        yii::import($paths['uiPath'] . '.*');
        // yii::import($paths['authPath'] . '.*');
        //yii::import($paths['dataPath'] . '.*');
        //yii::import($paths['configPath'] . '.*');
    }

    public function initPaths() {

        $basePath = "application.application.app." . get_class($this->parent);

        $paths = $this->paths = array(
            'basePath' => $basePath,
            'uiPath' => $basePath . '.ui',
            'classPath' => $basePath . '.classes',
            'dataPath' => $basePath . '.data',
            'configPath' => $basePath . '.config'
        );

        foreach ($paths as $name => $value) {
            $this->parent->setComponentProperty($name, $value);
        }
    }
}

?>
